package com.omni.monitor.model;

public class OmniConst {
    // ===================== MDC Key常量定义（避免硬编码）=====================
    // MDC键名
    public static final String TRACE_ID = "traceId";       // 全局唯一标识
    public static final String TRACE_ID_MDC_KEY = "omni-traceId";


    public static final String SPAN_ID = "spanId";         // 当前节点标识
    public static final String PARENT_SPAN_ID = "parentSpanId"; // 父节点标识

    public static final String THREAD_NAME = "threadName"; // 线程名（可选）
    // 复用外部分布式追踪的traceId（如Spring Cloud Sleuth）
    // 定义traceId在请求头和MDC中的key（保持一致）
    public static final String TRACE_ID_HEADER = "X-Trace-Id";
    public static final String SPAN_ID_HEADER = "X-Span-Id";
    public static final String PARENT_SPAN_ID_HEADER = "X-Parent-Span-Id";
}
